<?php
namespace App\Common\Library;
/**
 * 帮助工具类
 * Class Util
 * @package App\Common\Library
 */
class Util{
   public static function getExtByFileType($type){
       switch ($type) {
           case 'image/gif':
               return 'gif';
               break;
           case 'image/jpeg':
               return 'jpg';
               break;
           case 'image/png':
               return 'png';
               break;
           case 'image/bmp':
               return 'bmp';
               break;
           default:
               echo '查询文件类型:' . $type;
       }
   }
}